#include<iostream>
using namespace std;
typedef long long LL;
LL C(int m, int n) {
    LL sum = 1;
    for (int i = 1; i <= n; i++) {
        sum *= (m - i + 1);
        sum /= i;
    }
    return sum;
}
int main()
{
    int n, m;
    LL ans = 0;
    cin >> n >> m;
    for (int i = n; i <= m; i++) {
        ans += C(m, i);
    }
    cout << ans << endl;
	return 0;
}